package com.vcc.service.service;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.vcc.core.enumConstant.RoleEnum;
import com.vcc.data.entity.Role;
import com.vcc.service.boss.request.clientRole.BossClientRoleUpdateRequest;
import com.vcc.service.boss.response.clientRole.ClientRoleVoBoss;
import com.vcc.service.client.vo.role.RoleVo;

import java.util.Collection;
import java.util.List;


public interface RoleService extends IService<Role> {

    Role getRole(Long userId);

    List<Role> getRole(List<Long> userId);

    Role getByRoleEnum(RoleEnum roleEnum);

    Boolean existsById(Long id);

    Role getById(Long id);

    Boolean init(RoleEnum roleEnum, Long userId);

    Boolean init(Long roleId, Long userId);

    Boolean updateUserRole(Long userId, Long id, Long sourceId);

    List<Role> listByUserIds(Collection<Long> userIds);

    List<RoleVo> listByUserId(Role role,Long userId, String code, String name);

    Page<RoleVo> paging(Integer pagNumber, Integer pageSize, Role role, Long userId, String code, String name);

    boolean existsByUserIdAndCode(Long userId, String code);

    boolean updateNameAndHasAllDataById(Long id, String name, Boolean hasAllData);

    Page<ClientRoleVoBoss> paging(Page<ClientRoleVoBoss> page, Long userId, String code, String name);

    Boolean existsByCodeAndUserId(String code, Long userId);

    Boolean existsByNameAndUserId(String name, Long userId);

    Boolean existsByHasClientIntoRole(Boolean hasClientIntoRole);

    Role getClientInitRole();

    Boolean updateRole(BossClientRoleUpdateRequest bossClientRoleUpdateRequest);

    List<Role> listByCode(String code);

}
